﻿/* =========================================================
   WRAPPER PRINCIPALE E GALLERIA IMMAGINI
========================================================= */
.content-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  width: 100%;
  height: 100%; /* ora prende tutta l’altezza della hero */
  margin: 0;
  z-index: 1;
}

.image-gallery {
  position: relative;
  width: 100%;
  height: 100%; /* piena altezza del wrapper */
  margin: 0;
}

.gallery-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 102%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 4s ease-in-out;
}

.gallery-item-overlay { opacity: 0; }
.gallery-item-visible { opacity: 1; }

/* Sezione servizi ancorata alla hero */
.services-section {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 60%;
    height: 80%;
    max-width: 900px;
    min-width: 300px;
    z-index: 15;
    display: flex;
}

/* Service panel principale */
.services-panel {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    padding: 2vw;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
    opacity: 0;
    transform: translateX(100vw); /* fuori dallo schermo a destra */
    transition: transform 1s ease, opacity 1s ease; /* durata più fluida */
    border-radius: 3px;
}

.services-panel.is-visible {
    opacity: 0.95;
    transform: translateX(0); /* posizione finale */
}

/* Contenuto del panel */
.services-content {
    color: #fff;
    font-size: 1rem;
    line-height: 1.5;
    height: 100%;           /* prende tutta l'altezza del panel */
    overflow-y: auto;       /* scroll se necessario */
    padding-right: 1vw;     /* evita che il testo tocchi il bordo destro */

    /* Scrollbar sottile e discreta */
    scrollbar-width: thin;      /* Firefox */
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.services-content::-webkit-scrollbar {
    width: 6px; /* sottile */
}
.services-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3); /* colore semi-trasparente */
    border-radius: 3px;
}
.services-content::-webkit-scrollbar-track {
    background: transparent; /* nessuno sfondo evidente */
}

/* Titoli e paragrafi */
.services-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.services-panel p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* =========================================================
   ROTATE DEVICE MESSAGE
========================================================= */
.rotate-message {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  color: #555;
  font-size: 6vw;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 300 !important;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  z-index: 999999;
}

/* Mostra su tutti i tablet e mobile in portrait */
@media screen and (max-width: 1280px) and (orientation: portrait) {
  .rotate-message { display: flex !important; }
  body > *:not(.rotate-message) { display: none !important; }
}

/* Nasconde in landscape */
@media screen and (max-width: 1280px) and (orientation: landscape),
       (orientation: landscape) {
  .rotate-message { display: none !important; }
  body > *:not(.rotate-message) { visibility: visible !important; pointer-events: auto !important; }
}

/* =========================================================
   MEDIA QUERIES RESPONSIVE
========================================================= */

/* iPad Mini / Landscape */
@media screen and (min-width: 1024px) and (max-width: 1368px) and (orientation: landscape) {
    .services-section { width: 60%; top: 7%; left: 6%; height: 85%; }
    .services-panel { padding: 4vw; }
}

/* Desktop piccolo */
@media (max-width: 1280px) {
    .services-section { width: 60%; top: 9%; left: 6%; height: 80%; }
    .services-panel { padding: 4vw; }
}

/* Desktop piccolo inferiore */
@media (max-width: 1180px) {
    .services-section { width: 60%; top: 9%; left: 6%; height: 80%; }
    .services-panel { padding: 4vw; }
}

/* Tablet grande */
@media (max-width: 1024px) {
    .services-section { width: 60%; top: 7%; left: 7%; height: 85%; }
    .services-panel { padding: 4vw; }
}

/* Tablet medio */
@media (max-width: 915px) {
    .services-section { width: 60%; top: 11%; left: 5%; height: 75%; }
    .services-panel { padding: 4vw; }
}

/* Tablet medio inferiore */
@media (max-width: 851px) {
    .services-section { width: 60%; top: 12%; left: 5%; height: 75%; }
    .services-panel { padding: 4vw; }
}

/* Tablet piccolo */
@media (max-width: 812px) {
    .services-section { width: 60%; top: 12%; left: 5%; height: 75%; }
    .services-panel { padding: 4vw; }
}

/* Tablet piccolo / Mobile grande */
@media (max-width: 768px) {
    .services-section { width: 60%; top: 12%; left: 5%; height: 75%; }
    .services-panel { padding: 4vw; }
}

/* Mobile grande */
@media (max-width: 736px) {
    .services-section { width: 60%; top: 12%; left: 7%; height: 75%; }
    .services-panel { padding: 4vw; }
}

/* Mobile medio */
@media (max-width: 667px) {
    .services-section { width: 60%; top: 12%; left: 7%; height: 73%; }
    .services-panel { padding: 4vw; }
}

/* Mobile piccolo */
@media (max-width: 653px) {
    .services-section { width: 60%; top: 12%; left: 8%; height: 71%; }
    .services-panel { padding: 4vw; }
}

/* Mobile extra piccolo */
@media (max-width: 568px) {
    .services-section { width: 60%; top: 13%; left: 8%; height: 73%; }
    .services-panel { padding: 4vw; }
}

/* Mobile minimo */
@media (max-width: 480px) {
    .services-section { width: 60%; top: 10%; left: 8%; height: 76%; }
    .services-panel { padding: 4vw; }
}
